package com.lanyam.travel.base.entity;

import java.io.Serializable;
import java.util.List;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.annotation.JsonProperty;

/**
 * <p>
 * 
 * </p>
 *
 * @author rosson
 * @since 2020-02-24
 */
@TableName("travel_menu")
public class TravelMenu extends Model<TravelMenu> {

    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @JsonProperty(value="id")
    private String id;
    /**
     * 父级菜单id
     */
    @JsonProperty(value="fatherMenuId")
    @TableField("father_menu_id")
    private String fatherMenuId;
    /**
     * 菜单名称
     */
    @JsonProperty(value="menuName")
    @TableField("menu_name")
    private String menuName;
    /**
     * 菜单跳转的url
     */
    @JsonProperty(value="url")
    private String url;
    /**
     * 序号
     */
    @JsonProperty(value="indexNum")
    @TableField("index_num")
    private Integer indexNum;

    @JsonProperty(value="childen")
    @TableField(exist = false)
    private List<TravelMenu> childen;
    
    @JsonProperty(value="fatherMenuName")
    @TableField(exist = false)
    private String fatherMenuName;

    
    
    public String getFatherMenuName() {
		return fatherMenuName;
	}

	public void setFatherMenuName(String fatherMenuName) {
		this.fatherMenuName = fatherMenuName;
	}

	public List<TravelMenu> getChilden() {
		return childen;
	}

	public void setChilden(List<TravelMenu> childen) {
		this.childen = childen;
	}

	
    public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getFatherMenuId() {
		return fatherMenuId;
	}

	public void setFatherMenuId(String fatherMenuId) {
		this.fatherMenuId = fatherMenuId;
	}

	public String getMenuName() {
        return menuName;
    }

    public TravelMenu setMenuName(String menuName) {
        this.menuName = menuName;
        return this;
    }

    public String getUrl() {
        return url;
    }

    public TravelMenu setUrl(String url) {
        this.url = url;
        return this;
    }

    public Integer getIndexNum() {
        return indexNum;
    }

    public TravelMenu setIndexNum(Integer indexNum) {
        this.indexNum = indexNum;
        return this;
    }

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

    
    
    @Override
    public String toString() {
        return "TravelMenu{" +
        ", id=" + id +
        ", fatherMenuId=" + fatherMenuId +
        ", menuName=" + menuName +
        ", url=" + url +
        ", indexNum=" + indexNum +
        "}";
    }
}
